package com.qf.commerce.exception;

import com.qf.commerce.resp.ResponseStatus;
import lombok.Getter;

/**
 * @author zhangwei
 */
//自定义异常类 基础异常  他的子类是更详细的异常
@Getter
public class BaseException extends RuntimeException {
    private final ResponseStatus responseStatus;

    public BaseException(ResponseStatus responseStatus) {
        //设置异常信息 打印设置的报错信息
        super(responseStatus.getMessage());
        this.responseStatus = responseStatus;
    }
}
